fix - remove unwrap
authorHerman J. Radtke III <herman@hermanradtke.com>
Wed, 10 May 2017 04:49:20 +0000 (21:49 -0700)
committerHerman J. Radtke III <herman@hermanradtke.com>
Wed, 10 May 2017 04:49:20 +0000 (21:49 -0700)
src/cargo/core/workspace.rs

index 6c81bd8e827b0394267f0330dd2ee441fb6a9e3d..fd8531540f836c7838258bb7420c18fd457df165 100644 (file)
@@ -545,7 +545,10 @@ impl<'cfg> Workspace<'cfg> {
 }
 
 fn expand_member_path(path: &Path) -> CargoResult<Vec<PathBuf>> {
-    let path = path.to_str().unwrap();
+    let path = match path.to_str() {
+        Some(p) => p,
+        None => return Ok(Vec::new()),
+    };
     let res = glob(path).map_err(|e| {
         human(format!("could not parse pattern `{}`: {}", &path, e))
     })?;